<%@ Control Language="C#" AutoEventWireup="true" CodeFile="LoginBox.ascx.cs" Inherits="control_LoginBox" %>

<%@ Register Src="~/control/rounded_box/RoundedBox.ascx" TagPrefix="ucc" TagName="RoundedBox" %>

<ucc:RoundedBox Theme="gray" runat="server" ID="loginBox">
    <RoundBoxTemplate>
        <asp:Panel ID="pnlLogin" runat="server" DefaultButton="logon">
         <table width="250px">
            <tr>
                <td align="left" colspan="2">
                    <asp:ValidationSummary ID="responseMessage" runat="server" EnableClientScript="true" 
                        DisplayMode="BulletList" ValidationGroup="loginValidation" />
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <h5>Login:</h5>
                </td>
            </tr>
            <tr>
                <td>
                    Email:
                </td>
                <td>
                    <asp:TextBox ID="userName" runat="server" MaxLength="50" SkinID="LightRedText" 
                        Text="example@domain.com" TabIndex="1" Width="130px" 
                        ToolTip="Type the email that you used for registration in our site" ></asp:TextBox>
                    <asp:RequiredFieldValidator ID="userNameRequired" ControlToValidate="userName" runat="server"
                        Display="Dynamic" Text="*" ErrorMessage="Email Required" ValidationGroup="loginValidation">
                    </asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="emailValidate" ControlToValidate="userName" runat="server"
                        Display="Dynamic" Text="*" ErrorMessage="Invalid Email" ValidationGroup="loginValidation">
                    </asp:RegularExpressionValidator>
                    <asp:CustomValidator ID="validateLogon" runat="server" Text="*" 
                        ControlToValidate="userName" Display="Dynamic" ValidationGroup="loginValidation"
                        OnServerValidate="validateLogon_Validate" ErrorMessage="Login failed">
                    </asp:CustomValidator>
                </td>
            </tr>
            <tr>
                <td>
                    Password:
                </td>
                <td>
                    <asp:TextBox ID="password" runat="server" MaxLength="50" Width="130px" TextMode="Password"
                        ToolTip="Type your FashionZoomer account password" TabIndex="2">
                    </asp:TextBox>
                    <asp:RequiredFieldValidator ID="passwordRequired" ControlToValidate="password" runat="server"
                        Display="Dynamic" Text="*" ErrorMessage="Password Required" ValidationGroup="loginValidation">
                    </asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="passwordValidate" ControlToValidate="password" runat="server"
                        Display="Dynamic" Text="*" ErrorMessage="Password Should Be Alphanumeric" 
                        ValidationGroup="loginValidation">
                    </asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td>&nbsp;</td>
                <td>
                    <asp:ImageButton ID="logon" runat="server" AlternateText="Login" OnClick="logon_Click"
                        ValidationGroup="loginValidation" TabIndex="3" />
                </td>
            </tr>
            <tr>
                <td>&nbsp;</td>
                <td>
                    <a href="#">Forgot password? Recover here.</a>
                </td>
            </tr>
        </table>
        </asp:Panel>
    </RoundBoxTemplate>
</ucc:RoundedBox>

